Despite the best efforts of software developers, software programs inevitably fail at one time or another. One type of failure that a software program may encounter is referred to as a hang. A hang occurs when a program module is running and results in the suspension of the operation of the program module. A hang may occur when a program module is stuck in a loop of code. Hangs are frustrating to users and, in some cases, may cause the user to lose work in the form of unsaved data.
In the past, users coped with hangs by rebooting the computer that was running the hung program module or by forcing the application program to quit. The user's decision to reboot or quit usually occurred after the user tried, to no avail, to get the application program to respond to user input. Rebooting the computer releases the application program from the hung state. However, unsaved data from the hung program module may be lost when the computer is rebooted.
An injection tool may be used to inject a crash into a hung application to enable data recovery. The crash causes exception handling code to run. The exception handling code saves any open documents and enables the recovery of data from the documents when the application restarts. However, the user must be aware of the existence of the injection tool. The user must also know how to execute the injection tool at the appropriate time.